/*
 * Copyright Thoughtworks, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
@import "../../global/common";

$background-color: #ebf5f7;
$button-color: #2d6ca2;

.help {
  background-color: $white;
  padding: 20px;
}

.material {
  vertical-align: middle;
  margin: 0 10px 0 -15px;
  width: 60px;
  height: 40px;
  text-align: center;
  background: transparent url("../../../../app/assets/images/andare/thumbs-materials-100x100.png") no-repeat;

  &.git {
    background-position: 0 -60px;
  }

  &.mercurial {
    background-position: 0 -106px;
  }

  &.subversion {
    background-position: 0 -207px;
  }

  &.perforce {
    background-position: 0 -157px;
  }

  &.tfs {
    background-position: 0 -257px;
  }

  &.package {
    background-position: 0 -332px;
  }

  &.plugin {
    background: transparent url("../../../../app/assets/images/andare/icon-plugin-default.png") no-repeat;
    background-size: 45px;
  }

  &.unknown {
    background: $white;

    @include icon-before($type: $fa-var-question, $color: $icon-light-color, $size: 35px, $margin: 0);
  }
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modification-modal {
  background-color: $primary-bg;

  // fill the whole modal
  margin: 0 -30px -20px;
  padding: 5px 30px 20px;

  header {
    top: 50px;
  }
}

.modification {
  padding: 10px;
  background-color: $white;
  margin-bottom: 10px;
  border: 1px solid $line-color;
  border-radius: 3px;
  display: flex;
  justify-content: space-between;
  width: 100%;

  .user {
    width: 25%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }

  .commentWrapper {
    width: 55%;
    padding: 0 5px;
  }

  .rev {
    width: 15%;
  }
}

.pagination {
  display: flex;
  justify-content: center;

  .pagination-link {
    margin: 4px;
    padding: 6px 10px;
    background-color: $white;
    border-radius: $global-border-radius;
    text-align: center;
  }

  .disabled {
    color: $go-disabled;
    cursor: not-allowed;
    text-decoration: none;
  }
}

.search-box-wrapper {
  text-align: right;

  input {
    width: 350px;
  }
}

.ellipse-wrapper {
  display: inline-block;
  word-break: break-all;
  white-space: pre-line;
}

.ellipsis-action-button {
  color: $button-color;
  padding-left: 10px;
  cursor: pointer;
}

.commit-info {
  font-size: 13px;
  word-break: break-all;
  max-width: 630px;
}

.usages {
  table td:last-child {
    width: 35%;
  }
}

.spinner-wrapper {
  display: flex;
  justify-content: center;
  flex-direction: column;
}

.modification-wrapper {
  margin-top: 30px;
}

.revision {
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
  max-width: 70%;
  float: left;
}

.comment {
  white-space: pre-wrap;
  max-height: 160px;
  overflow-y: scroll;
  width: 100%;
}

.warnings {
  color: $warning-txt;

  p {
    padding-left: 10px;
  }
}

.errors {
  color: $failed;

  p {
    padding-left: 10px;
  }
}
